<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" href="https://unpkg.com/animate.css@3.5.1/animate.min.css">
    <style>
        #box{
            width: 100px;
            height: 100px;
            background-color: #f00;
        }
        /*
        使用keyframes动画，只需要添加enter-active 和 leave-active即可
        方法：.v-enter-active{animation : 动画名称 时间 曲线}
        */
        .pop-enter-active{
            animation: pop-show 1s linear;
        }
        .pop-leave-active{
            animation: pop-hiden 1s linear;
        }
        @keyframes pop-show{
            0%{
                transform: scale(0,0);
            }
            50%{
                transform: scale(1.2,1.2);
            }
            100%{
                transform: scale(1,1);
            }
        }
        @keyframes pop-hiden{
            0%{
                transform: scale(1,1);
            }
            50%{
                transform: scale(1.2,1.2);
            }
            100%{
                transform: scale(0,0);
            }
        }
        /*----------------------自定义----------------------*/
    </style>
</head>
<body>
    <div id="app">
        <input type="checkbox" v-model='isshow'>
        
        <transition name='pop'>
            <div id="box" v-show='isshow'></div>
        </transition>

        <transition
            enter-active-class="animated zoomIn"
            leave-active-class="animated zoomOut"
        >
            <p v-if="isshow">hello</p>
        </transition>
    </div>
    <script src='vue.js'></script>
    <script>
        new Vue({
            el:'#app',
            data:{
                isshow:false,
            },
            mounted:function(){
                this.isshow = true
            }
        })
    </script>
</body>
</html>